cmake_minimum_required(VERSION 3.8)
project(unset_var_cache)

set(myvar "This is my variable")
unset(myvar)

set(mycache "This is my cache" CACHE STRING "This is the doc string")
unset(mycache CACHE)

message(STATUS "myvar = ${myvar}")
message(STATUS "mycache = ${mycache}")



set(var "This is var")
function(func)
	unset(var PARENT_SCOPE)
	message(STATUS "var - from - func - ${var}")
endfunction()
func()
message(STATUS "var - ${var}")
